# !/usr/bin/env python3
# -*- encoding: utf-8 -*-
import time
import util
from orm import Model, StringField, BooleanField, FloatField


class User(Model):
    __table__ = 'users'
    id = StringField(
        primary_key=True, default=util.next_id, column_type='varchar(50)')
    email = StringField(column_type='varchar(50)')
    passwd = StringField(column_type='varchar(50)')
    admin = BooleanField(default=False)
    name = StringField(column_type='varchar(50)')
    image = StringField(column_type='varchar(500)')
    created_at = FloatField(default=time.time)